home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Demo / ibrowse / ib.py < prev    next >
Encoding:
Python Source  |  2000-06-23  |  393 b   |  22 lines

  1. #! /usr/bin/env python
  2.  
  3. # Call ibrowse (the info file browser) under UNIX.
  4.  
  5. import sys
  6. import ibrowse
  7.  
  8. if len(sys.argv) > 1:
  9.     file = sys.argv[1]
  10.     if len(sys.argv) > 2:
  11.         if len(sys.argv) > 3:
  12.             sys.stdout = sys.stderr
  13.             print 'usage:', sys.argv[0], '[file [node]]'
  14.             sys.exit(2)
  15.         else:
  16.             node = sys.argv[2]
  17.     else:
  18.         node = ''
  19.     ibrowse.start('(' + file + ')' + node)
  20. else:
  21.     ibrowse.main()
  22.